import java.util.HashMap;
import java.util.Objects;

class Student {
    public String id = "12343221";

    public Student(String id) {
        this.id = id;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return Objects.equals(id, student.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}

public class Test {
    public static void main(String[] args) {
        Student student1 = new Student("1324");
        Student student2 = new Student("1324");
        HashBuck2<Student, Integer> hashBuck2 = new HashBuck2<>();
        hashBuck2.put(student1,1);
        System.out.println(hashBuck2.get(student2));
    }
    public static void main2(String[] args) {
        HashMap<Student, Integer> map = new HashMap<>();
        Student student1 = new Student("1324");
        Student student2 = new Student("1324");
        System.out.println(student1.hashCode());
        System.out.println(student2.hashCode());

    }
    public static void main1(String[] args) {
        HashBuck hashBuck = new HashBuck();
        hashBuck.put(1,11);
        hashBuck.put(2,22);
        hashBuck.put(3,33);
        hashBuck.put(13,133);
        hashBuck.put(33,333);
        hashBuck.put(23,34);
        hashBuck.put(62,324);
        hashBuck.put(64,341);
        hashBuck.put(46,344);
        hashBuck.put(65,314);

        System.out.println(hashBuck.get(1));
        System.out.println(hashBuck.get(2));
        System.out.println(hashBuck.get(3));
        System.out.println(hashBuck.get(13));
        System.out.println(hashBuck.get(33));
    }
}
